Skip to content

Conversation

@ciscoRankush
Copy link
Contributor

COMPLETES N/A - Documentation Enhancement

This pull request addresses

Adding AI-optimized documentation for all task-related widgets to help AI assistants understand call handling and task management workflows.

by making the following changes

  • Added packages/contact-center/task/ai-docs/widgets/CallControl/AGENTS.md and ARCHITECTURE.md
  • Added packages/contact-center/task/ai-docs/widgets/IncomingTask/AGENTS.md and ARCHITECTURE.md
  • Added packages/contact-center/task/ai-docs/widgets/OutdialCall/AGENTS.md and ARCHITECTURE.md
  • Added packages/contact-center/task/ai-docs/widgets/TaskList/AGENTS.md and ARCHITECTURE.md

Change Type

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Tooling change
  • Internal code refactor

The following scenarios were tested

  • The testing is done with the amplify link

The GAI Coding Policy And Copyright Annotation Best Practices

  • GAI was not used (or, no additional notation is required)
  • Code was generated entirely by GAI
  • GAI was used to create a draft that was subsequently customized or modified
  • Coder created a draft manually that was non-substantively modified by GAI (e.g., refactoring was performed by GAI on manually written code)
  • Tool used for AI assistance (GitHub Copilot / Other - specify)
    • Github Copilot
    • Other - Please Specify: Cursor AI
  • This PR is related to
    • Feature
    • Defect fix
    • Tech Debt
    • Automation

Checklist before merging

  • I have not skipped any automated checks
  • All existing and new tests passed
  • I have updated the testing document
  • I have tested the functionality with amplify link

Make sure to have followed the contributing guidelines before submitting.

@aws-amplify-us-east-2
Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-577.d1b38q61t1z947.amplifyapp.com


## Props API

| Prop | Type | Default | Description |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a common query regarding the methods listed below, all of the do not have the arguement {task} here but in the code they do, so let me know if it is done intentionally,

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching this added the proper arguments


| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `onHoldResume` | `(isHeld: boolean) => void` | - | Callback when hold state changes |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as per the code, the onHoldResume method has two input arguements, (isHeld : boolean , task : ITask).
here the task parameter is missing, do let me know if it is done intentionally.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the correct arguments

|------|------|---------|-------------|
| `onHoldResume` | `(isHeld: boolean) => void` | - | Callback when hold state changes |
| `onEnd` | `() => void` | - | Callback when call ends |
| `onWrapUp` | `() => void` | - | Callback when wrapup completes |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

onWrapUp({
  task: currentTask,
  wrapUpReason: wrapUpReason,
})

here the two parameters are missing

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the correct arguments

- `TASK_RECORDING_PAUSED` - Recording paused
- `TASK_RECORDING_RESUMED` - Recording resumed

**Returns:** All functions and state for call control operations
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we not going to mention the returned functions and variables here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, the plan is that that information will come from the knowledge base of the sdk

U->>C: Click Transfer button
C->>C: Show transfer modal
U->>C: Select agent from list
C->>H: transferCall(agentId, name, 'AGENT')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the Code, i am only able to see two parameters.
const transferCall = async (to: string, type: DestinationType)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the correct arguments

U->>C: Click Consult button
C->>C: Show consult modal
U->>C: Select agent
C->>H: consultCall(agentId, name, 'AGENT')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const consultCall = async (
consultDestination: string,
destinationType: DestinationType,
allowParticipantsToInteract: boolean
)

parameters not matching here, do let me know if it is done intentionally.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the correct arguments

U->>C: Click Conference button
C->>C: Show conference modal
U->>C: Select agent
C->>H: consultCall(agentId, name, 'AGENT')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here also the parameters are different from the one mentioned in the code

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the correct arguments

C->>C: setSelectedWrapupReason(code)

U->>C: Click Submit Wrapup
C->>H: wrapupCall(reason, id, auxCode)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const wrapupCall = (wrapUpReason: string, auxCodeId: string)
in the code i am only able to see two arguement instead of the three mentioned here.
do let me know if it is done intentionally.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the correct arguments

- `accept()` - Accept task handler
- `reject()` - Reject task handler
- `isBrowser` - Boolean flag

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Parameter isDeclineButtonEnabled is missing here, could i please know is it done intentionally?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the correct arguments

**Returns:**
- `startOutdial(destination, origin)` - Start outdial function
- `getOutdialANIEntries()` - Fetch ANI entries async function

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return {
startOutdial,
getOutdialANIEntries,
getAddressBookEntries,
isTelephonyTaskActive,
};
two parameters are not mentioned above

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the correct arguments

H->>H: logger.error('Hold failed')
end

Note over U,B: Resume flow similar with task.resume()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the Resume scenario, it is appropriate to mention the use of onHoldResume(false)

H->>T: task.consultCall({targetAgentId, destinationType})
T->>B: POST /task/consult
B-->>T: Consult call created
T-->>S: Emit TASK_CONSULT_STARTED
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The TASK_EVENT named TASK_CONSULT_STARTED does not appear in the repository, while TASK_CONSULT_ACCEPTED and TASK_CONSULT are present . Please let me know if this was done intentionally.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to the correct version

H-->>C: Hide timer
else Timer reaches 0
H->>H: Auto-wrapup triggered
H->>H: wrapupCall(null, null, null)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we have three arguements instead of two.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the correct arguments

@Shreyas281299 Shreyas281299 added the validated Indicates that the PR is ready for actions label Feb 3, 2026

## Overview

Provides call control functionality (hold, mute, transfer, consult, conference, end, wrapup) for active telephony tasks. Includes both standard and CAD (Customer Attached Data) variants.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not just 'telephony tasks', we also have digital tasks

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated


## Why This Widget?

**Problem:** Agents need comprehensive call control during active conversations.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The whole file is more specific for calls but this widget supports call and digital task so we can improve the prompt to be less call specific

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

Comment on lines 40 to 43
onHoldResume={(isHeld) => console.log('Hold:', isHeld)}
onEnd={() => console.log('Call ended')}
onWrapUp={() => console.log('Wrapup complete')}
onRecordingToggle={({ isRecording }) => console.log('Recording:', isRecording)}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For all the callbacks, there is task object that is returned. We need to confirm the correct params returned

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the correct arguments

Comment on lines 62 to 64
```html
<widget-cc-call-control></widget-cc-call-control>
<widget-cc-call-control-cad></widget-cc-call-control-cad>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we are removing WC

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

Comment on lines 141 to 143
"@webex/cc-components": "workspace:*",
"@webex/cc-store": "workspace:*",
"@webex/cc-ui-logging": "workspace:*",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets put actual versions

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added

U->>C: Click Consult button
C->>C: Show consult modal
U->>C: Select agent
C->>H: consultCall(agentId, name, 'AGENT')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the correct arguments

U->>C: Click Conference button
C->>C: Show conference modal
U->>C: Select agent
C->>H: consultCall(agentId, name, 'AGENT')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the correct arguments

C->>C: setSelectedWrapupReason(code)

U->>C: Click Submit Wrapup
C->>H: wrapupCall(reason, id, auxCode)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the correct arguments

- `accept()` - Accept task handler
- `reject()` - Reject task handler
- `isBrowser` - Boolean flag

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the correct arguments

**Returns:**
- `startOutdial(destination, origin)` - Start outdial function
- `getOutdialANIEntries()` - Fetch ANI entries async function

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the correct arguments

@Shreyas281299 Shreyas281299 merged commit 7be06c9 into webex:next Feb 3, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

validated Indicates that the PR is ready for actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants